from collections import deque

d = deque('abcdefg')
print('Deque: ', d)
print('Length: ', len(d))
print('Left end: ', d[0])
print('Right end: ', d[-1])

d.remove('c')
print('remove(c): ', d)
